<template>
  <router-view/>


  <nav class="tab-bar">
    <router-link class="tab-bar-item" to="/home">
      <div class="icon"><i class="iconfont icon-yuedu"></i></div>
      <div>阅读</div>
    </router-link>

    <router-link class="tab-bar-item" to="/category">
      <div class="icon"><i class="iconfont icon-shujia"></i></div>
      <div>书架</div>
    </router-link>

    <router-link class="tab-bar-item" to="/order">
      <div class="icon"><i class="iconfont icon-bofang"></i></div>
      <div>播放</div>
    </router-link>

    <router-link class="tab-bar-item" to="/user">
      <div class="icon">
        <!-- <van-badge :content="$store.state.num1" > -->
        <i class="iconfont icon-wo"></i>
        <!-- </van-badge> -->
      </div>
      <div>我</div>
    </router-link>

  </nav>

</template>

<style lang="scss">

@import "assets/css/iconfont.css";
nav {
  display:flex;
  width: 100vw;
  height: 45px;
  position:fixed;
  left:0px;
  bottom: 0px;
  right: 0px;
  background: white;

  //padding: 30px;

  a {
    font-weight: bold;
    color: #2c3e50;

    &.router-link-exact-active {
      color: #42b983;
    }
  }
  .tab-bar-item {
    flex: 1;
    text-align: center;
    height: 50px;
    font-size: 16px;
  }
  .tab-bar-item .icon {
    width: 24px;
    height: 24px;
    margin-top: 3px;
    vertical-align: middle;
    display: inline-block;

  }
}

</style>
